package com.excel.service.util;

import org.apache.poi.ss.usermodel.Workbook;
import org.jeecgframework.poi.excel.entity.TemplateExportParams;
import org.jeecgframework.poi.excel.export.template.ExcelExportOfTemplateUtil;

import java.util.Map;

/**
 * 导出,导入excel
 * Created by lhlong on 2017/4/24.
 */
public class ExcelPoi {
    /**
     * 单模板导出
     * @param params
     * @param map
     * @return
     */
    public static Workbook exportExcel(TemplateExportParams params,Map<String,Object> map){
        return new ExcelExportOfTemplateUtil().createExcleByTemplate(params,null,null,map);
    }

    /**
     * 多sheet导出
     */
    public static Workbook exportExcelSheets(TemplateExportParams params,Map<Integer,Map<String,Object>> map){
        return new ExcelExportOfTemplateUtil().createExcleByTemplate(params,map);
    }

}
